****************************************************************************
** KNOWLEDGE, EXPERTISE, AND COMMITTEE POWER IN THE CONTEMPORARY CONGRESS **
** James M. Curry **
********************

*****************************************************
** Commands to Replicate All Analyses in the Paper **
*****************************************************

*** FIGURE 1
use "Fig1-data_committee-processes.dta", clear
** Fig 1-a
twoway connected perc_houserpt perc_senaterpt cong, ///
	yscale(range(0 1)) ylabel(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%") ///
	xscale(range(93 112)) xlabel(93 "93rd (73-74)" 94 "94th (75-76)" 95 "95th (77-78)" 96 "96th (79-80)" 97 "97th (81-82)" 98 "98th (83-84)" 99 "99th (85-86)" 100 "100th (87-88)" 101 "101st (89-90)" 102 "102nd (91-92)" 103 "103rd (93-94)" 104 "104th (95-96)" 105 "105th (97-98)" 106 "106th (99-00)" 107 "107th (01-02)" 108 "108th (03-04)" 109 "109th (05-06)" 110 "110th (07-08)" 111 "111th (09-10)" 112 "112th (11-12)",  angle(vertical)) ///
	legend(position(6) rows(1) order(1 "House of Representatives" 2 "Senate"))
** Fig 1-b
twoway connected perc_housemultref perc_senatemultref cong, ///
	yscale(range(0 .5)) ylabel(0 "0%" .25 "25%" .5 "50%") ///
	xscale(range(93 112)) xlabel(93 "93rd (73-74)" 94 "94th (75-76)" 95 "95th (77-78)" 96 "96th (79-80)" 97 "97th (81-82)" 98 "98th (83-84)" 99 "99th (85-86)" 100 "100th (87-88)" 101 "101st (89-90)" 102 "102nd (91-92)" 103 "103rd (93-94)" 104 "104th (95-96)" 105 "105th (97-98)" 106 "106th (99-00)" 107 "107th (01-02)" 108 "108th (03-04)" 109 "109th (05-06)" 110 "110th (07-08)" 111 "111th (09-10)" 112 "112th (11-12)",  angle(vertical)) ///
	legend(position(6) rows(1) order(1 "House of Representatives" 2 "Senate"))
** Fig 1-c
twoway connected num_confrpt cong, yaxis(1) yscale(range(0 200) axis(1)) ///
 || connected pct_confrpt cong, yaxis(2) yscale(range(0 1) axis(2)) ///
	xscale(range(93 113)) xlabel(93 "93rd (73-74)" 94 "94th (75-76)" 95 "95th (77-78)" 96 "96th (79-80)" 97 "97th (81-82)" 98 "98th (83-84)" 99 "99th (85-86)" 100 "100th (87-88)" 101 "101st (89-90)" 102 "102nd (91-92)" 103 "103rd (93-94)" 104 "104th (95-96)" 105 "105th (97-98)" 106 "106th (99-00)" 107 "107th (01-02)" 108 "108th (03-04)" 109 "109th (05-06)" 110 "110th (07-08)" 111 "111th (09-10)" 112 "112th (11-12)" 113 "113th (13-14)",  angle(vertical)) ///
	legend(position(6) rows(1) order(1 "# of conference reports" 2 "% of enacted bills with conference reports"))

*** FIGURE 2
use "Fig2-data_staff.dta", clear
** Fig 2a
graph bar house_percomm house_permem, over(cong) /// 
	legend(position(6) rows(1) order(1 "# staff per committee" 2 "# staff per member"))
** Fig 2b
graph bar senate_percomm senate_permem, over(cong) /// 
	legend(position(6) rows(1) order(1 "# staff per committee" 2 "# staff per senator"))
	
*** TABLE 1 - Activity and positions of committee leaders during amendment debates
use "curry-amendments-data.dta", clear
tab chair_manage
tab rm_manage
tab majsub_manage 
tab minsub_manage
tab chair_position
tab rm_position
tab subchair_position
tab subrm_position

*** TABLE 2 - Logistic Regressions Predicting MCs votes
use "curry-rollcall-data.dta", clear
eststo AllMajority: logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if majority==1, cluster(id)
eststo OpenMajority: logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee  chair_amend comm_hetero commdiffchammed cong110 if majority==1 & openrule==1, cluster(id)
eststo ClosedMajority: logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee  chair_amend comm_hetero commdiffchammed cong110 if majority==1 & openrule==0, cluster(id)
eststo AllMinority: logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee  chair_amend openrule comm_hetero commdiffchammed cong110 if majority==0, cluster(id)
eststo OpenMinority: logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee  chair_amend comm_hetero commdiffchammed cong110 if majority==0 & openrule==1, cluster(id)
eststo ClosedMinority: logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee  chair_amend comm_hetero commdiffchammed cong110 if majority==0 & openrule==0, cluster(id)
esttab, se bic star(* 0.05 ** 0.01) mtitles
eststo clear

*** FIGURE 3 - Predicted Effects - Majority party lawmakers
quietly logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if majority==1, cluster(id)
	quietly margins, at(dw_diff_spon=(0(.05)1.885) chair_position = (-1, 0, 1))
	marginsplot, ytitle("likelihood of support") xtitle("Distance from amendment sponsor") saving(fig1, replace)
quietly logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if majority==1, cluster(id)
	quietly margins, at(dw_diff_spon=(0(.05)1.885) rm_position = (-1, 0, 1))
	marginsplot, ytitle("likelihood of support") xtitle("Distance from amendment sponsor") saving(fig2, replace)
quietly logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if majority==1, cluster(id)
	quietly margins, at(dw_diff_spon=(0(.05)1.885) subchair_position = (-1, 0 1))
	marginsplot, ytitle("likelihood of support") xtitle("Distance from amendment sponsor") saving(fig3, replace)
quietly logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if majority==1, cluster(id)
	quietly margins, at(dw_diff_spon=(0(.05)1.885) subrm_position = (-1, 0, 1))
	marginsplot, ytitle("likelihood of support") xtitle("Distance from amendment sponsor") saving(fig4, replace)
graph combine fig1.gph fig2.gph fig3.gph fig4.gph

*** FIGURE 4 - Predicted Effects - Minority party lawmakers
quietly logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if majority==0, cluster(id)
	quietly margins, at(dw_diff_spon=(0(.05)1.885) chair_position = (-1, 0, 1))
	marginsplot, ytitle("likelihood of support") xtitle("Distance from amendment sponsor") saving(fig1, replace)
quietly logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if majority==0, cluster(id)
	quietly margins, at(dw_diff_spon=(0(.05)1.885) rm_position = (-1, 0, 1))
	marginsplot, ytitle("likelihood of support") xtitle("Distance from amendment sponsor") saving(fig2, replace)
quietly logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if majority==0, cluster(id)
	quietly margins, at(dw_diff_spon=(0(.05)1.885) subchair_position = (-1, 0 1))
	marginsplot, ytitle("likelihood of support") xtitle("Distance from amendment sponsor") saving(fig3, replace)
quietly logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if majority==0, cluster(id)
	quietly margins, at(dw_diff_spon=(0(.05)1.885) subrm_position = (-1, 0, 1))
	marginsplot, ytitle("likelihood of support") xtitle("Distance from amendment sponsor") saving(fig4, replace)
graph combine fig1.gph fig2.gph fig3.gph fig4.gph

*** TABLE 3 - Logistic Regressions Predicting Likelihood Amendments are Adopted
use "curry-amendments-data.dta", clear
eststo All: logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110, cluster(bill)
eststo AllOpen: logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian seniority oncommittee chair_amend comm_hetero commdiffchammed cong110 if openrule==1, cluster(bill)
eststo AllClosed: logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian seniority oncommittee chair_amend comm_hetero commdiffchammed cong110 if openrule==0, cluster(bill)
eststo AllRC: logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if rollcall==1, cluster(bill)
eststo AllRCOpen: logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian seniority oncommittee chair_amend comm_hetero commdiffchammed cong110 if rollcall==1 & openrule==1, cluster(bill)
eststo AllRCClosed: logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian seniority oncommittee chair_amend comm_hetero commdiffchammed cong110 if rollcall==1 & openrule==0, cluster(bill)
esttab, se bic star(* 0.05 ** 0.01) mtitles
eststo clear

*** FIGURE 5 - Predicted Effects (All Amendments)
quietly logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110, cluster(bill)
	quietly margins, at(spon_distfrommedian=(.003(.05)1.131) chair_position = (-1, 0, 1))
	marginsplot, ytitle("Likelihood of adoption") xtitle("Sponsor distance from chamber median") saving(fig1, replace)
quietly logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110, cluster(bill)
	quietly margins, at(spon_distfrommedian=(.003(.05)1.131) rm_position = (-1, 0, 1))
	marginsplot, ytitle("Likelihood of adoption") xtitle("Sponsor distance from chamber median") saving(fig2, replace)
quietly logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110, cluster(bill)
	quietly margins, at(spon_distfrommedian=(.003(.05)1.131) subchair_position = (-1, 0, 1))
	marginsplot, ytitle("Likelihood of adoption") xtitle("Sponsor distance from chamber median") saving(fig3, replace)
quietly logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110, cluster(bill)
	quietly margins, at(spon_distfrommedian=(.003(.05)1.131) subrm_position = (-1, 0, 1))
	marginsplot, ytitle("Likelihood of adoption") xtitle("Sponsor distance from chamber median") saving(fig4, replace)
graph combine fig1.gph fig2.gph fig3.gph fig4.gph

*** FIGURE 6 - Predicted Effects (Amendments with roll-calls, only)
quietly logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if rollcall==1, cluster(bill)
	quietly margins, at(spon_distfrommedian=(.003(.05)1.131) chair_position = (-1, 0, 1))
	marginsplot, ytitle("Likelihood of adoption") xtitle("Sponsor distance from chamber median") saving(fig1, replace)
quietly logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if rollcall==1, cluster(bill)
	quietly margins, at(spon_distfrommedian=(.003(.05)1.131) rm_position = (-1, 0, 1))
	marginsplot, ytitle("Likelihood of adoption") xtitle("Sponsor distance from chamber median") saving(fig2, replace)
quietly logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if rollcall==1, cluster(bill)
	quietly margins, at(spon_distfrommedian=(.003(.05)1.131) subchair_position = (-1, 0, 1))
	marginsplot, ytitle("Likelihood of adoption") xtitle("Sponsor distance from chamber median") saving(fig3, replace)
quietly logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if rollcall==1, cluster(bill)
	quietly margins, at(spon_distfrommedian=(.003(.05)1.131) subrm_position = (-1, 0, 1))
	marginsplot, ytitle("Likelihood of adoption") xtitle("Sponsor distance from chamber median") saving(fig4, replace)
graph combine fig1.gph fig2.gph fig3.gph fig4.gph

*** TABLE A-5 - Predicting Effect of Combined Committee Leadership Cues on Roll-Call Votes
use "curry-rollcall-data.dta", clear
eststo: logit vote c.commmajcue##c.commmincue dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if majority==1, cluster(id)
eststo: logit vote c.commmajcue##c.commmincue dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if majority==0, cluster(id)
esttab, se bic star(* 0.05 ** 0.01)
eststo clear

*** FIGURE 7 - Predicted Effects of Table A-5
quietly logit vote c.commmajcue##c.commmincue dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if majority==1, cluster(id)
	quietly margins, at(commmajcue=(-1,0,1) commmincue=(-1,0,1))
	marginsplot, ytitle("likelihood of support") xtitle("Committe Majority Cue") saving(fig1, replace)
quietly logit vote c.commmajcue##c.commmincue dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if majority==0, cluster(id)
	quietly margins, at(commmincue=(-1,0,1) commmajcue=(-1,0,1))
	marginsplot, ytitle("likelihood of support") xtitle("Committe Minority Cue") saving(fig2, replace)
graph combine fig1.gph fig2.gph

*** TABLE A-6 - Predicting Effect of Combined Committee Leadership Cues on Amendment Adoption
use "curry-amendments-data.dta", clear
eststo All: logit pass c.commmajcue##c.commmincue spon_distfrommedian seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110, cluster(bill)
eststo AllRC: logit pass c.commmajcue##c.commmincue spon_distfrommedian seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if rollcall==1, cluster(bill)
esttab, se bic star(* 0.05 ** 0.01) mtitles
eststo clear

*** FIGURE 8 - Predicted Effects of Table A-6
quietly logit pass c.commmajcue##c.commmincue spon_distfrommedian seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110, cluster(bill)
	quietly margins, at(commmajcue=(-1,0,1) commmincue=(-1,0,1))
	marginsplot, ytitle("likelihood of support") xtitle("Committee Majority Cue") saving(fig1, replace)
quietly logit pass c.commmajcue##c.commmincue spon_distfrommedian seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if rollcall==1, cluster(bill)
	quietly margins, at(commmincue=(-1,0,1) commmajcue=(-1,0,1))
	marginsplot, ytitle("likelihood of support") xtitle("Committee Minority Cue") saving(fig2, replace)
graph combine fig1.gph fig2.gph


******************************************************************
** Commands to Replicate All Additional Analyse in the Appendix **
******************************************************************

*** TABLE A-1
use "curry-rollcall-data.dta", clear
eststo: meqrlogit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee chair_amend openrule cong110 || comm_manage: comm_hetero commdiffchammed if majority==1
eststo: meqrlogit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee chair_amend cong110 || comm_manage: comm_hetero commdiffchammed if majority==1 & openrule==1
eststo: meqrlogit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee chair_amend cong110 || comm_manage: comm_hetero commdiffchammed if majority==1 & openrule==0, intpoints(1)
eststo: meqrlogit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee chair_amend openrule cong110 || comm_manage: comm_hetero commdiffchammed if majority==0, intpoints(1)
eststo: meqrlogit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee chair_amend cong110 || comm_manage: comm_hetero commdiffchammed if majority==0 & openrule==1, intpoints(1)
eststo: meqrlogit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee chair_amend cong110 || comm_manage: comm_hetero commdiffchammed if majority==0 & openrule==0, intpoints(1)
esttab, se bic star(* 0.05 ** 0.01) mtitles
eststo clear

*** TABLE A-2
use "curry-amendments-data.dta", clear
eststo: meqrlogit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian seniority oncommittee chair_amend openrule cong110 || comm_manage: comm_hetero commdiffchammed
eststo: meqrlogit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian seniority oncommittee chair_amend cong110 || comm_manage: comm_hetero commdiffchammed if openrule==1
eststo: meqrlogit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian seniority oncommittee chair_amend cong110 || comm_manage: comm_hetero commdiffchammed if openrule==0
eststo: meqrlogit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian seniority oncommittee chair_amend openrule cong110 || comm_manage: comm_hetero commdiffchammed if rollcall==1
eststo: meqrlogit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian seniority oncommittee chair_amend cong110 || comm_manage: comm_hetero commdiffchammed if rollcall==1 & openrule==1
eststo: meqrlogit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian seniority oncommittee chair_amend cong110 || comm_manage: comm_hetero commdiffchammed if rollcall==1 & openrule==0
esttab, se bic star(* 0.05 ** 0.01)
eststo clear

*** TABLE A-3
use "curry-rollcall-data.dta", clear
eststo AllMajority: logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med C.seniority##i.oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if majority==1, cluster(id)
eststo OpenMajority: logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med c.seniority##i.oncommittee  chair_amend comm_hetero commdiffchammed cong110 if majority==1 & openrule==1, cluster(id)
eststo ClosedMajority: logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med c.seniority##i.oncommittee  chair_amend comm_hetero commdiffchammed cong110 if majority==1 & openrule==0, cluster(id)
eststo AllMinority: logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med c.seniority##i.oncommittee  chair_amend openrule comm_hetero commdiffchammed cong110 if majority==0, cluster(id)
eststo OpenMinority: logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med c.seniority##i.oncommittee  chair_amend comm_hetero commdiffchammed cong110 if majority==0 & openrule==1, cluster(id)
eststo ClosedMinority: logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med c.seniority##i.oncommittee  chair_amend comm_hetero commdiffchammed cong110 if majority==0 & openrule==0, cluster(id)
esttab, se bic star(* 0.05 ** 0.01) mtitles
eststo clear

*** FIGURE A-1
use "curry-rollcall-data.dta", clear
quietly logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med C.seniority##i.oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if majority==1, cluster(id)
	margins, at(seniority=(1(1)27) oncommittee=(0,1))
	marginsplot, ///
		title("Majority lawmakers - all") ytitle("Likelihood of support") xtitle("Seniority of sponsor") ///
		yscale(range(0 .8)) ylabel(0 "0%" .20 "20%" .4 "40%" .6 "60%" .8 "80%") ///
		xscale(range(1 27)) ///
		legend(position(6) rows(1) order(1 "NOT on committee" 2 "On committee")) ///
		saving(int1.gph, replace)
quietly logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med c.seniority##i.oncommittee  chair_amend comm_hetero commdiffchammed cong110 if majority==1 & openrule==1, cluster(id)
	margins, at(seniority=(1(1)27) oncommittee=(0,1))
	marginsplot, ///
		title("Majority lawmakers - open rules") ytitle("Likelihood of support") xtitle("Seniority of sponsor") ///
		yscale(range(0 .8)) ylabel(0 "0%" .20 "20%" .4 "40%" .6 "60%" .8 "80%") ///
		xscale(range(1 27)) ///
		legend(position(6) rows(1) order(1 "NOT on committee" 2 "On committee")) ///
		saving(int2.gph, replace)
quietly logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med c.seniority##i.oncommittee  chair_amend comm_hetero commdiffchammed cong110 if majority==1 & openrule==0, cluster(id)
	margins, at(seniority=(1(1)27) oncommittee=(0,1))
	marginsplot, ///
		title("Majority lawmakers - closed rules") ytitle("Likelihood of support") xtitle("Seniority of sponsor") ///
		yscale(range(0 .8)) ylabel(0 "0%" .20 "20%" .4 "40%" .6 "60%" .8 "80%") ///
		xscale(range(1 27)) ///
		legend(position(6) rows(1) order(1 "NOT on committee" 2 "On committee")) ///
		saving(int3.gph, replace)
quietly logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med c.seniority##i.oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if majority==0, cluster(id)
	margins, at(seniority=(1(1)27) oncommittee=(0,1))
	marginsplot, ///
		title("Minority lawmakers - all") ytitle("Likelihood of support") xtitle("Seniority of sponsor") ///
		yscale(range(0 .8)) ylabel(0 "0%" .20 "20%" .4 "40%" .6 "60%" .8 "80%") ///
		xscale(range(1 27)) ///
		legend(position(6) rows(1) order(1 "NOT on committee" 2 "On committee")) ///
		saving(int4.gph, replace)
quietly logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med c.seniority##i.oncommittee  chair_amend comm_hetero commdiffchammed cong110 if majority==0 & openrule==1, cluster(id)
	margins, at(seniority=(1(1)27) oncommittee=(0,1))
	marginsplot, ///
		title("Minority lawmakers - open rules") ytitle("Likelihood of support") xtitle("Seniority of sponsor") ///
		yscale(range(0 .8)) ylabel(0 "0%" .20 "20%" .4 "40%" .6 "60%" .8 "80%") ///
		xscale(range(1 27)) ///
		legend(position(6) rows(1) order(1 "NOT on committee" 2 "On committee")) ///
		saving(int5.gph, replace)
quietly logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med c.seniority##i.oncommittee  chair_amend comm_hetero commdiffchammed cong110 if majority==0 & openrule==0, cluster(id)
	margins, at(seniority=(1(1)27) oncommittee=(0,1))
	marginsplot, ///
		title("Minority lawmakers - closed rules") ytitle("Likelihood of support") xtitle("Seniority of sponsor") ///
		yscale(range(0 .8)) ylabel(0 "0%" .20 "20%" .4 "40%" .6 "60%" .8 "80%") ///
		xscale(range(1 27)) ///
		legend(position(6) rows(1) order(1 "NOT on committee" 2 "On committee")) ///
		saving(int6.gph, replace)
graph combine int1.gph int2.gph int3.gph int4.gph int5.gph int6.gph

*** TABLE A-4
use "curry-amendments-data.dta", clear
eststo All: logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian c.seniority##i.oncommittee chair_amend openrule comm_hetero commdiffchammed cong110, cluster(bill)
eststo AllOpen: logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian c.seniority##i.oncommittee chair_amend comm_hetero commdiffchammed cong110 if openrule==1, cluster(bill)
eststo AllClosed: logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian c.seniority##i.oncommittee chair_amend comm_hetero commdiffchammed cong110 if openrule==0, cluster(bill)
eststo AllRC: logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian c.seniority##i.oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if rollcall==1, cluster(bill)
eststo AllRCOpen: logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian c.seniority##i.oncommittee chair_amend comm_hetero commdiffchammed cong110 if rollcall==1 & openrule==1, cluster(bill)
eststo AllRCClosed: logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian c.seniority##i.oncommittee chair_amend comm_hetero commdiffchammed cong110 if rollcall==1 & openrule==0, cluster(bill)
esttab, se bic star(* 0.05 ** 0.01) mtitles
eststo clear

*** FIGURE A-2
use "curry-amendments-data.dta", clear
quietly logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian c.seniority##i.oncommittee chair_amend openrule comm_hetero commdiffchammed cong110, cluster(bill)
	margins, at(seniority=(1(1)27) oncommittee=(0,1))
	marginsplot, ///
		title("All Amendments") ytitle("Likelihood of support") xtitle("Seniority of sponsor") ///
		yscale(range(0 .8)) ylabel(0 "0%" .20 "20%" .4 "40%" .6 "60%" .8 "80%") ///
		xscale(range(1 27)) ///
		legend(position(6) rows(1) order(1 "NOT on committee" 2 "On committee")) ///
		saving(int1.gph, replace)
quietly logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian c.seniority##i.oncommittee chair_amend comm_hetero commdiffchammed cong110 if openrule==1, cluster(bill)
	margins, at(seniority=(1(1)27) oncommittee=(0,1))
	marginsplot, ///
		title("All Amendments - Open Rules") ytitle("Likelihood of support") xtitle("Seniority of sponsor") ///
		yscale(range(0 .8)) ylabel(0 "0%" .20 "20%" .4 "40%" .6 "60%" .8 "80%") ///
		xscale(range(1 27)) ///
		legend(position(6) rows(1) order(1 "NOT on committee" 2 "On committee")) ///
		saving(int2.gph, replace)
quietly logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian c.seniority##i.oncommittee chair_amend comm_hetero commdiffchammed cong110 if openrule==0, cluster(bill)
	margins, at(seniority=(1(1)27) oncommittee=(0,1))
	marginsplot, ///
		title("All Amendments - Restricted Rules") ytitle("Likelihood of support") xtitle("Seniority of sponsor") ///
		yscale(range(0 .8)) ylabel(0 "0%" .20 "20%" .4 "40%" .6 "60%" .8 "80%") ///
		xscale(range(1 27)) ///
		legend(position(6) rows(1) order(1 "NOT on committee" 2 "On committee")) ///
		saving(int3.gph, replace)
quietly logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian c.seniority##i.oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if rollcall==1, cluster(bill)
	margins, at(seniority=(1(1)27) oncommittee=(0,1))
	marginsplot, ///
		title("Roll-call Only - All") ytitle("Likelihood of support") xtitle("Seniority of sponsor") ///
		yscale(range(0 .8)) ylabel(0 "0%" .20 "20%" .4 "40%" .6 "60%" .8 "80%") ///
		xscale(range(1 27)) ///
		legend(position(6) rows(1) order(1 "NOT on committee" 2 "On committee")) ///
		saving(int4.gph, replace)
quietly logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian c.seniority##i.oncommittee chair_amend comm_hetero commdiffchammed cong110 if rollcall==1 & openrule==1, cluster(bill)
	margins, at(seniority=(1(1)27) oncommittee=(0,1))
	marginsplot, ///
		title("Roll-call Only - Open Rules") ytitle("Likelihood of support") xtitle("Seniority of sponsor") ///
		yscale(range(0 .8)) ylabel(0 "0%" .20 "20%" .4 "40%" .6 "60%" .8 "80%") ///
		xscale(range(1 27)) ///
		legend(position(6) rows(1) order(1 "NOT on committee" 2 "On committee")) ///
		saving(int5.gph, replace)
quietly logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian c.seniority##i.oncommittee chair_amend comm_hetero commdiffchammed cong110 if rollcall==1 & openrule==0, cluster(bill)
	margins, at(seniority=(1(1)27) oncommittee=(0,1))
	marginsplot, ///
		title("Roll-call Only - Restricted Rules") ytitle("Likelihood of support") xtitle("Seniority of sponsor") ///
		yscale(range(0 .8)) ylabel(0 "0%" .20 "20%" .4 "40%" .6 "60%" .8 "80%") ///
		xscale(range(1 27)) ///
		legend(position(6) rows(1) order(1 "NOT on committee" 2 "On committee")) ///
		saving(int6.gph, replace)
graph combine int1.gph int2.gph int3.gph int4.gph int5.gph int6.gph

*** FIGURE A-3
use "curry-rollcall-data.dta", clear
quietly logit vote chair_position rm_position subchair_position subrm_position relative_dist dist_party_fav spon_dist_med seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if majority==1, cluster(id)
quietly margins, at(relative_dist=(-1(.1)1.2) chair_position=(-1,0,1))
	marginsplot, title("Committee Chairs") ytitle("Likelihood of support") xtitle("Relative distance from amendment sponsor and committee median") ///
		yscale(range(0 1)) ylabel(0 "0%" .20 "20%" .4 "40%" .6 "60%" .8 "80%" 1 "100%") ///
		xscale(range(-1 1.2)) ///
		legend(position(6) rows(1) order(1 "Oppose" 2 "Neutral" 3 "Support")) ///
		saving(int1.gph, replace)
quietly margins, at(relative_dist=(-1(.1)1.2) rm_position=(-1,0,1))
	marginsplot, title("Ranking Members") ytitle("Likelihood of support") xtitle("Relative distance from amendment sponsor and committee median") ///
		yscale(range(0 1)) ylabel(0 "0%" .20 "20%" .4 "40%" .6 "60%" .8 "80%" 1 "100%") ///
		xscale(range(-1 1.2)) ///
		legend(position(6) rows(1) order(1 "Oppose" 2 "Neutral" 3 "Support")) ///
		saving(int2.gph, replace)
quietly margins, at(relative_dist=(-1(.1)1.2) subchair_position=(-1,0,1))
	marginsplot, title("Subcommittee Chairs") ytitle("Likelihood of support") xtitle("Relative distance from amendment sponsor and committee median") ///
		yscale(range(0 1)) ylabel(0 "0%" .20 "20%" .4 "40%" .6 "60%" .8 "80%" 1 "100%") ///
		xscale(range(-1 1.2)) ///
		legend(position(6) rows(1) order(1 "Oppose" 2 "Neutral" 3 "Support")) ///
		saving(int3.gph, replace)
quietly margins, at(relative_dist=(-1(.1)1.2) subrm_position=(-1,0,1))
	marginsplot, title("Subcommittee RMs") ytitle("Likelihood of support") xtitle("Relative distance from amendment sponsor and committee median") ///
		yscale(range(0 1)) ylabel(0 "0%" .20 "20%" .4 "40%" .6 "60%" .8 "80%" 1 "100%") ///
		xscale(range(-1 1.2)) ///
		legend(position(6) rows(1) order(1 "Oppose" 2 "Neutral" 3 "Support")) ///
		saving(int4.gph, replace)
graph combine int1.gph int2.gph int3.gph int4.gph

*** FIGURE A-4
use "curry-rollcall-data.dta", clear
quietly logit vote chair_position rm_position subchair_position subrm_position relative_dist dist_party_fav spon_dist_med seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if majority==0, cluster(id)
quietly margins, at(relative_dist=(-1.2(.1).9) chair_position=(-1,0,1))
	marginsplot, title("Committee Chairs") ytitle("Likelihood of support") xtitle("Relative distance from amendment sponsor and committee median") ///
		yscale(range(0 1)) ylabel(0 "0%" .20 "20%" .4 "40%" .6 "60%" .8 "80%" 1 "100%") ///
		xscale(range(-1.2 .9)) ///
		legend(position(6) rows(1) order(1 "Oppose" 2 "Neutral" 3 "Support")) ///
		saving(int1.gph, replace)
quietly margins, at(relative_dist=(-1.2(.1).9) rm_position=(-1,0,1))
	marginsplot, title("Ranking Members") ytitle("Likelihood of support") xtitle("Relative distance from amendment sponsor and committee median") ///
		yscale(range(0 1)) ylabel(0 "0%" .20 "20%" .4 "40%" .6 "60%" .8 "80%" 1 "100%") ///
		xscale(range(-1.2 .9)) ///
		legend(position(6) rows(1) order(1 "Oppose" 2 "Neutral" 3 "Support")) ///
		saving(int2.gph, replace)
quietly margins, at(relative_dist=(-1.2(.1).9) subchair_position=(-1,0,1))
	marginsplot, title("Subcommittee Chairs") ytitle("Likelihood of support") xtitle("Relative distance from amendment sponsor and committee median") ///
		yscale(range(0 1)) ylabel(0 "0%" .20 "20%" .4 "40%" .6 "60%" .8 "80%" 1 "100%") ///
		xscale(range(-1.2 .9)) ///
		legend(position(6) rows(1) order(1 "Oppose" 2 "Neutral" 3 "Support")) ///
		saving(int3.gph, replace)
quietly margins, at(relative_dist=(-1.2(.1).9) subrm_position=(-1,0,1))
	marginsplot, title("Subcommittee RMs") ytitle("Likelihood of support") xtitle("Relative distance from amendment sponsor and committee median") ///
		yscale(range(0 1)) ylabel(0 "0%" .20 "20%" .4 "40%" .6 "60%" .8 "80%" 1 "100%") ///
		xscale(range(-1.2 .9)) ///
		legend(position(6) rows(1) order(1 "Oppose" 2 "Neutral" 3 "Support")) ///
		saving(int4.gph, replace)
graph combine int1.gph int2.gph int3.gph int4.gph

*** TABLE A-7
use "curry-rollcall-data.dta", clear
eststo Maj109: logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee chair_amend openrule comm_hetero commdiffchammed if majority==1 & cong==109, cluster(id)
eststo Min109: logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee  chair_amend openrule comm_hetero commdiffchammed if majority==0 & cong==109, cluster(id)
eststo Maj110: logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee chair_amend openrule comm_hetero commdiffchammed if majority==1 & cong==110, cluster(id)
eststo Min110: logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee  chair_amend openrule comm_hetero commdiffchammed if majority==0 & cong==110, cluster(id)
esttab, se bic star(* 0.05 ** 0.01) mtitles
eststo clear

*** TABLE A-8
use "curry-amendments-data.dta", clear
eststo All109: logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian seniority oncommittee chair_amend openrule comm_hetero commdiffchammed if cong==109, cluster(bill)
eststo AllRC109: logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian seniority oncommittee chair_amend openrule comm_hetero commdiffchammed if cong==109 & rollcall==1, cluster(bill)
eststo All110: logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian seniority oncommittee chair_amend openrule comm_hetero commdiffchammed if cong==110, cluster(bill)
eststo AllRC110: logit pass chair_position rm_position subchair_position subrm_position spon_distfrommedian seniority oncommittee chair_amend openrule comm_hetero commdiffchammed if cong==110 & rollcall==1, cluster(bill)
esttab, se bic star(* 0.05 ** 0.01) mtitles
eststo clear

*** TABLE A-9 
use "curry-rollcall-data.dta", clear
eststo democrats: logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee chair_amend openrule comm_hetero commdiffchammed cong110 if democrats==1, cluster(id)
eststo republicans: logit vote chair_position rm_position subchair_position subrm_position dw_diff_spon dist_party_fav spon_dist_med seniority oncommittee  chair_amend openrule comm_hetero commdiffchammed cong110 if democrats==0, cluster(id)
esttab, se bic star(* 0.05 ** 0.01) mtitles
eststo clear
